Instead of:
<pre>
&lt;li&gt;
    &lt;a onclick="this.parentNode.removeChild(this)" href="#"&gt;Click me to delete me&lt;/a&gt;
&lt;/li&gt;

Your markup remains:

&lt;ul id="example"&gt;
   &lt;li&gt;
     &gt;a href="/someurl">Click me to delete me</a>
   &lt;/li&gt;
&lt;/ul&gt;

Then, in a separate script, you can provide the behavior using CSS selectors.

var myrules = {
   '#example li' : function(el) {
      el.onclick = function() {
         this.parentNode.removeChild(this);
      }
   }
};

Behaviour.register(myrules);
</pre>
http://www.firelord.net/modifiedbehavior